package person;

import schedule.Schedule;
import sensor.Sensor;

/**
 * 
 * @author Minodor A person or actor in the scenario
 * 
 */
public class Person {

	private boolean active;

	private int age;
	private int busyTimer;
	private Location currentLocation;
	private boolean inHouse;
	private String lastName;
	private String name;
	private DayPlan plan;
	private Sensor rFid;
	private Schedule schedule;
	private Sex sex;

	public Person() {
		schedule = null;
		name = null;
		currentLocation = null;
		sex = null;
		active = false;
		inHouse = true;
		busyTimer = 0;
		plan = null;
		rFid = null;
	}

	public Person(String name) {
		this.name = name;
	}

	public Person(String name, Schedule s) {
		this.name = name;
		this.schedule = s;
	}

	public void decrementTimer() {
		busyTimer--;
	}

	public int getAge() {
		return age;
	}

	public int getBusyTimer() {
		return busyTimer;
	}

	public Location getCurrentLocation() {
		return currentLocation;
	}

	public String getLastName() {
		return lastName;
	}

	public String getName() {
		return name;
	}

	public DayPlan getPlan() {
		return plan;
	}

	public Sensor getrFid() {
		return rFid;
	}

	public Schedule getSchedule() {
		return schedule;
	}

	public Sex getSex() {
		return sex;
	}

	public boolean isActive() {
		return active;
	}

	public boolean isInHouse() {
		return inHouse;
	}

	public void setActive(boolean active) {
		this.active = active;
	}

	public void setAge(int age) {
		this.age = age;
	}

	public void setBusyTimer(int busyTimer) {
		this.busyTimer = busyTimer;
	}

	public void setCurrentLocation(Location currentLocation) {
		this.currentLocation = currentLocation;
		// rFid.setSensorData(House.getInstance().getRoom(currentLocation.getCurrent()).getID());
	}

	public void setInHouse(boolean inHouse) {
		this.inHouse = inHouse;

	}

	public void setLastName(String lastName) {
		this.lastName = lastName;
	}

	public void setName(String name) {
		this.name = name;
	}

	public void setPlan(DayPlan plan) {
		this.plan = plan;
	}

	public void setrFid(Sensor rFid) {
		this.rFid = rFid;
	}

	public void setSchedule(Schedule schedule) {
		this.schedule = schedule;
	}

	public void setSex(Sex sex) {
		this.sex = sex;
	}

	@Override
	public String toString() {
		return name + " " + lastName;
	}

	public String print() {
		return "Person: \nFirst Name = " + name + " Last Name = " + lastName
				+ "\n Sex = " + sex + " Age = " + age + "\n RFID = "
				+ rFid.getSensorID();
	}

}
